<script>
	import {checklocation,getLocation} from '@/utils/common.js';
	export default {
		onLaunch: function() {
			uni.clearStorage();
			// console.log(this.$store)
			
			
			const timer = setInterval(() => {
				const session = uni.getStorageSync('session') || {};
				// console.log(session.openid)
				const _props = {store:this.$store,openid:session.openid};
				checklocation(_props);
				// console.log('_props===>',_props)
				getLocation(_props);
			}, 10000);
			this.defined.setTimer(timer);
			// console.log('App Launch');
		},
		onShow: function() {
			// console.log('App Show',this.defined);
		},
		onHide: function() {
			// console.log('App Hide',this.defined);
			if(this.defined.globalTimer){
				this.defined.removeIimer();
			}
		}
	}
</script>

<style lang="scss">
	@import "colorui/main.css";
	@import "colorui/icon.css";
	@import "uni.scss";

	.m-input {
		width: 100%;
		min-height: 100%;
		display: flex;
	}
	body{
		background-color: #F4F4F4;
		font-size: 14px;
	}
	
	.content {
		display: flex;
		flex: 1;
		flex-direction: column;
		background-color: $my-color-background;
	}
	
	.input-group {
		background-color: $my-color-white;
		margin-top: 20upx;
		position: relative;
		border-radius: $my-border-radius;
	}
	
	.input-row {
		display: flex;
		flex-direction: row;
		position: relative;
	}
	
	.input-row .title {
		width: 25%;
		white-space: nowrap;
		height: 50upx;
		min-height: 50upx;
		padding: 15upx 0;
		// padding-left: 30upx;
		line-height: 50upx;
		color:$my-text-color-label;
		font-size: $my-font-size-label;
	}
	
	.input-row.border::after {
		position: absolute;
		right: 0;
		bottom: 0;
		left: 15upx;
		height: 1upx;
		content: '';
		-webkit-transform: scaleY(.5);
		transform: scaleY(.5);
		background-color: $my-border-color;
	}
	
	.btn-row {
		margin-top: 50upx;
	}
	
	input{
		font-size: $my-font-size-value;
		color: $my-text-color-value;
	}
	button.primary {
		background-color: $my-theme;
	}
	.radius{
		border-radius: $my-border-radius;
	}
	.cu-form-group .title{
		font-size: $my-font-size-label;
		color:$my-text-color-label
	}
	.cu-form-group uni-picker .picker{
		font-size: $my-font-size-value;
		color:$my-text-color-value
	}
	.cu-form-group uni-textarea{
		font-size: $my-font-size-value;
		color:$my-text-color-value
	}
	.cu-form-group.align-start .title{
		margin-top: 20px;
	}
	
	.form{
		background: $my-color-white;
	}
	.cu-form-group .title {
		min-width: calc(4em + 15px);
	}
	.cu-form-group{
		background: transparent;
	}
</style>
